<?php


namespace App\Models;


use App\Engine\BaseModel;

class MarkingLog extends BaseModel
{
    protected $table = 'marking_log';

    protected $fillable = [
        'uid',
        'invite_uid',
        'form',
        'reward',
    ];


    public function setFormAttribute($value)
    {
        if (!$value){
            $value=[];
        }
        $this->attributes["form"]=json_encode($value,256);
    }

    public function getFormAttribute($value)
    {
        if (!$value)
            return [];
        return json_decode($value,256);
    }
}
